Generating Design Pattern Detectors from Pattern Specifications

نویسندگان

  • Dirk Heuzeroth
  • Stefan Mandel
  • Welf Löwe
چکیده

We present our approach to support program understanding by a tool that generates static and dynamic analysis algorithms from design pattern specifications to detect design patterns in legacy code. We therefore specify the static and dynamic aspects of patterns as predicates, and represent legacy code by predicates that encode its attributed abstract syntax trees. Given these representations, the static analysis is performed on the legacy code representation as a query derived from the specification of the static pattern aspects. It provides us with pattern candidates in the legacy code. The dynamic specification represents state sequences expected when using a pattern. We monitor the execution of the candidates and check their conformance to this expectation. We demonstrate our approach and evaluate our tool by detecting instances of the Observer, Composite and Decorator patterns in Java code using Prolog to define predicates and queries.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Application of Early Error Detection for Handling Degraded Modes of Operation

Real-time software applications are in charge of maintaining a timely and predictable interaction with their environment, being it hardware devices, or other software entities. In this paper, we illustrate the use of early error detectors (that we previously described in [1]), generated from timed automata based specifications, in a recovery block-like design pattern. This design pattern is enh...

متن کامل

Proposing a (COVID-19) Post-Pandemic Sustainable Pattern in Architectural and Urban Spaces

Introduction: Epidemics have been a challenge at all levels of the environment. Many current trends in architecture and urban design/planning are the results of measures that have already been taken to ensure the health and well-being of city dwellers. Since urban design/ planning and architecture after Covid-19 will never be the same as in the past, the need for developing a pattern for urban ...

متن کامل

چهارچوب مفهومی اجتماع پایدار در جهان‌بینی اسلامی و سنت شهرسازی مسلمانان

Title “sustainable society”, was first time propounded in the format of the conceptual framework of sustainable development as the final objective of social aspect of sustainable development. By now, many researches have studied this point that what specifications and characteristics a sustainable society should have and how urban planning can help creation of a sustainable society. However wha...

متن کامل

A systematic review of code generation proposals from state machine specifications

0950-5849/$ see front matter 2012 Elsevier B.V. A http://dx.doi.org/10.1016/j.infsof.2012.04.008 ⇑ Corresponding author. E-mail addresses: [email protected] (E. Domínguez Context: Model Driven Development (MDD) encourages the use of models for developing complex software systems. Following a MDD approach, modelling languages are used to diagrammatically model the structure and behaviour of objec...

متن کامل

A UML-Based Metamodeling Language to Specify Design Patterns

A design pattern describes a generic solution for problems that occur repeatedly. Current descriptions of design patterns describe solutions with graphical notation and complementing text. To encourage the use of design patterns, the development of pattern supporting tools is imperative. This requires design patterns to be specified precisely. There has been considerable work done on pattern sp...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003